import os
import tkinter
from tkinter import * 

master = Tk()
master.title('复制图片')

#按钮事件
def copyImage():
  f1 = open("img1.gif", "rb+")
  byte = f1.read()
  f1.close()
  f2 = open("img2.gif", "wb+")
  f2.write(byte)
  f2.close()
  photo2 = PhotoImage(file='img2.gif')
  label_2 = Label(image=photo2)
  label_2.image = photo2
  label_2.grid(row=0, column=1 )  

photo1 = PhotoImage(file='img1.gif')
label_1 = Label(image=photo1)
label_1.image = photo1
label_1.grid(row=0, column=0 )  

button_copy = tkinter.Button(master, text='复制图片', command=copyImage)
button_copy.grid(row=1,column=0)

master.mainloop()